﻿
using System;
using System.Web.UI.HtmlControls;
using System.Xml;

public partial class WebPage_SheZhi_Shengji : SystemBBasePage
{
    protected string des = string.Empty;
    protected string down = string.Empty;

    protected string newversion = "是";
    protected decimal serverversion = 1.0M;

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        this.HeaderControl1.Select = "shezhi";
        if (this.Session["version"] == null)
        {
        }
        try
        {
            XmlDocument document = new XmlDocument();
            document.Load("http://update.asdht.com/freegrade.aspx?old=" + 1.0M);
            XmlNodeList childNodes = document.SelectSingleNode("/root").ChildNodes;
            this.serverversion = Convert.ToDecimal(childNodes[0].InnerText);
            if (this.serverversion > 1.0M)
            {
                this.newversion = "否";
                this.down = childNodes[2].InnerText;
                string[] strArray = this.down.Split(new char[] { ';' });
                this.down = string.Empty;
                for (int i = 0; i < strArray.Length; i++)
                {
                    this.down = this.down + "<a href=\"" + strArray[i] + "\">" + strArray[i].Substring(strArray[i].LastIndexOf("/") + 1) + "</a><br>";
                }
                this.des = childNodes[1].InnerText;
            }
        }
        catch
        {
        }
    }
}

